import { request } from "../utils/request.js";

/**
 * 分页查询
 * @param params
 * @returns {*}
 */
export const page = (params) => {
    return request({
        url: '/user/page',
        method: 'get',
        params
    })
}

/**
 * 新增
 * @param data
 * @returns {*}
 */
export const add = (data) => {
    return request({
        url: '/user/add',
        method: 'post',
        data
    })
}

/**
 * 修改
 * @param data
 * @returns {*}
 */
export const update = (data) => {
    return request({
        url: '/user/update',
        method: 'put',
        data
    })
}

/**
 * 删除
 * @param params
 * @returns {*}
 */
export const remove = (params) => {
    return request({
        url: '/user/delete',
        method: 'get',
        params
    })
}